﻿<%@ Page Title="Log In" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Login.aspx.cs" Inherits="Account_Login" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <script src="../dropDown/js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../dropDown/js/jquery.dropDown.pack.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Логиньтесь...
    </h2>
    <p>
        Если вы зарегистрированы - логиньтесь, нет -
        <asp:HyperLink ID="HyperLink1" 
                       runat="server" 
                       EnableViewState="false" 
                       NavigateUrl="~/Account/Registration/Step1.aspx"
                       Text="регистрируйтесь" />!
    </p>
    <asp:Login ID="Login1" runat="server" FailureText="Либо вы нагнали, либо на сервере косяки, пробуйте еще раз!">
        <LayoutTemplate>
            <table>
                <tr>
                    <td>
                        <fieldset class="login">
                            <legend>Пишите
                                <asp:HyperLink ID="HyperLink2"
                                               runat="server" 
                                               EnableViewState="false" 
                                               NavigateUrl="~/Account/Restoration.aspx"
                                               Text="(если не забыли)" />:
                            </legend>
                            <table cellpadding="1" cellspacing="0" style="border-collapse: collapse;">
                                <tr>
                                    <td>
                                        <table>
                                            <tr>
                                                <td colspan="2">
                                                    <br />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="UserNameLabel" 
                                                               runat="server" 
                                                               AssociatedControlID="UserName" 
                                                               Text="Ваш ник:" />
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="UserNameRequired" 
                                                                                runat="server" 
                                                                                ControlToValidate="UserName"
                                                                                ErrorMessage="User Name is required." 
                                                                                ToolTip="User Name is required." 
                                                                                ValidationGroup="Login1">
                                                        *
                                                    </asp:RequiredFieldValidator>
                                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" 
                                                                                    runat="server" 
                                                                                    ControlToValidate="UserName"
                                                                                    ErrorMessage="не может быть такого имени!!" 
                                                                                    ValidationExpression="[\w| ]*" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="PasswordLabel" 
                                                               runat="server" 
                                                               AssociatedControlID="Password" 
                                                               Text="+пароль:" />
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="Password" 
                                                                 runat="server" 
                                                                 TextMode="Password" />
                                                    <asp:RequiredFieldValidator ID="PasswordRequired" 
                                                                                runat="server" 
                                                                                ControlToValidate="Password"
                                                                                ErrorMessage="Password is required." 
                                                                                ToolTip="Password is required." 
                                                                                ValidationGroup="Login1">
                                                        *
                                                    </asp:RequiredFieldValidator>
                                                    <asp:RegularExpressionValidator ID="PwdValidator" 
                                                                                    runat="server" 
                                                                                    ControlToValidate="Password"
                                                                                    ErrorMessage="такого пароля не может быть!!!" 
                                                                                    ValidationExpression='[\w| !"$%&amp; /()=\-?*]*' />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2">
                                                    <br />
                                                    <asp:CheckBox ID="RememberMe" runat="server" Text="запомнить." />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center" colspan="2" style="color: Red;">
                                                    <asp:Literal ID="FailureText" runat="server" EnableViewState="False" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </fieldset>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Button ID="LoginButton" 
                                    runat="server" 
                                    CommandName="Login" 
                                    Text="Залогиниться" 
                                    ValidationGroup="Login1" />
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
    </asp:Login>
    <br />
</asp:Content>
